<?php

use Illuminate\Support\Facades\Route;
use Modules\Inventory\Http\Controllers\InventoryController;
use Modules\Inventory\Http\Controllers\InventoryTransController;
use Modules\Inventory\Http\Controllers\TransferOrderController;
use Modules\Inventory\Http\Controllers\TransferOrderDetailController;
use Modules\Inventory\Http\Controllers\InventoryPlanController;
use Modules\Inventory\Http\Controllers\InventoryOrderController;
use Modules\Inventory\Http\Controllers\InventoryOrderDetailController;
use Modules\Inventory\Http\Controllers\InventorySettlementController;

Route::prefix('inventory')->group(function(){

    //即时库存
	Route::apiResource('inventory', InventoryController::class);
    //库存变动记录
	Route::apiResource('trans', InventoryTransController::class);
    //调拨单据头
	Route::apiResource('transfer/order', TransferOrderController::class);
    //调拨单据体
	Route::apiResource('transfer/detail', TransferOrderDetailController::class);

	//分步式调出提交
    Route::post('setby/out',[TransferOrderController::class,'setByOut']);
    //分步式调入提交
    Route::post('setby/inbound',[TransferOrderController::class,'setByInbound']);
    //分步式调出箱号扫描
    Route::get('setby/out/lotnum/{lotnum}',[TransferOrderController::class,'getOutByLotnum']);

    //盘点方案
	Route::apiResource('plan', InventoryPlanController::class);
    //盘点方案差异汇总
    Route::get('plan/diff/group',[InventoryPlanController::class,'getDiffGroupBy']);
    //盘点方案审核
    Route::post('plan/confirm/{planId}',[InventoryPlanController::class,'confirm']);
    //按盘点方案计算盘点单差异
    Route::post('plan/verify/{planId}',[InventoryPlanController::class,'inventoryOrderVerify']);
    //盘点单据头
	Route::apiResource('inventory/order/list', InventoryOrderController::class);
    //单点单据体
	Route::apiResource('inventory/order/detail', InventoryOrderDetailController::class);
	//next
    
	//库存重算
    Route::post('rollback',[InventoryController::class,'rollback']);

    //库存结算
	Route::apiResource('inventorysettlement', InventorySettlementController::class);



    
});





